//
//  GameBegain.m
//  Find the difference
//
//  Created by administrator on 16/8/12.
//  Copyright © 2016年 duanzhenglong. All rights reserved.
//

#import "GameBegain.h"
#import "Game.h"
@interface GameBegain ()
@end

@implementation GameBegain

- (void)viewDidLoad {
#define Width self.view.frame.size.width
#define Height  self.view.frame.size.height
    [super viewDidLoad];
    self.view.backgroundColor=[UIColor yellowColor];
    UIImageView*imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, Width/3, Width/3)];
    imageView.center=CGPointMake(Width/2, Height/4);
    imageView.image=[UIImage imageNamed:@"logo"];
    imageView.layer.cornerRadius=10;
    imageView.layer.masksToBounds=YES;
    [self.view addSubview:imageView];
    
    UIButton*StartGame=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 120, 50)];
    StartGame.center=CGPointMake(Width/2, Height/2);
    [StartGame setTitle:@"开始游戏" forState:UIControlStateNormal];
    [StartGame setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [StartGame setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    StartGame.titleLabel.font=[UIFont systemFontOfSize:20];
    StartGame.backgroundColor=[UIColor redColor];
    StartGame.enabled=YES;
    StartGame.layer.cornerRadius=8;
    StartGame.layer.masksToBounds=YES;
    [StartGame addTarget:self action:@selector(Start) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:StartGame];
    
    UIButton*Share=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 120, 50)];
    Share.center=CGPointMake(Width/2, Height*3/5);
    [Share setTitle:@"分 享" forState:UIControlStateNormal];
    [Share setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [Share setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    Share.titleLabel.font=[UIFont systemFontOfSize:20];
    Share.backgroundColor=[UIColor redColor];
    Share.enabled=YES;
    Share.layer.cornerRadius=8;
    Share.layer.masksToBounds=YES;
    [Share addTarget:self action:@selector(share) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:Share];
}
-(void)Start{
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    Game*G1=[storyboard instantiateViewControllerWithIdentifier:@"Game"];
    [self presentViewController:G1 animated:YES completion:nil];
}
-(void)share{
    
}
@end
